package com.cory.module.oplog.domain.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * 
 *
 * @author xc
 * @since 2022-01-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
public class Oplog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String objectAlias;

    private String objectName;

    private String objectId;
    
    private String objectData;

    private Integer userId;

    private String userName;

    private Integer operateType;
    
    private String operateName;
    
    private String remarks;
    
    private String requestIp;

    private LocalDateTime logTime;

    public Oplog(String objectAlias, String objectName, String objectId, String objectData, 
            Integer userId, String userName, Integer operateType, String operateName, String remarks, String requestIp) {
        super();
        this.objectAlias = objectAlias;
        this.objectName = objectName;
        this.objectId = objectId;
        this.objectData = objectData;
        this.userId = userId;
        this.userName = userName;
        this.operateType = operateType;
        this.operateName = operateName;
        this.remarks = remarks;
        this.requestIp = requestIp;
    }
    
    private transient String startDate;
    private transient String endDate;
}
